<template>
	<view class="minePage">
		<!-- <view class="head">
			 <view class="head-image"><open-data type="userAvatarUrl"></open-data></view>
			 <view class="person-info"><open-data type="userNickName"></open-data></view>
		</view> -->
		<view class="header_group">
			<view class="userClass">
				<view class="userName"><open-data type="userNickName"></open-data></view>
				<view class="userImg"><open-data type="userAvatarUrl"></open-data></view>
			</view>
			<image class="headerImg" src="../../static/bg_mine.png"></image>
		</view>
		<view class="iconGroup">
			 <view @click="prizeLog(0)">参与抽奖{{prizeNum}}</view>
			 <view @click="prizeLog(1)">中奖记录{{winNum}}</view>
			 <view class="order-show">
			 	
			 	<navigator url="/pages/order-info/order-info">我的订单</navigator>
			 </view>
			 <view class="order-show">
			 	
			 	<navigator url="/pages/addrManage/index">我的地址</navigator>
			 </view>
			 <view class="feedback">
			 	<navigator url="/pages/feedback-info/feedback-info">反馈</navigator>
			 </view>
			 <view class="customer-service">
			 	<navigator url="/pages/customer-info/customer-info">客服</navigator>
			 </view>
			 <view class="customer-service">
			 	<navigator url="/pages/user/question">常见问题及免责声明</navigator>
			 </view>
		</view>
		<auth/>
	</view>
</template>

<script>
	import {getUserPrizeNum} from "../../service/base.js"
	import auth from "@/components/authorization/index.vue"
	export default {
		components:{
			auth
		},
		data() {
			return {
				prizeNum: 0,
				winNum: 0
			}
		},
		onLoad() {
			this.userPrizeNum()
		},
		methods: {
			userPrizeNum() {
				getUserPrizeNum({}).then(res=> {
					console.log(res)
					this.prizeNum = res.data.prize_num
					this.winNum = res.data.win_num
				})
			},
			prizeLog(type) {
				uni.navigateTo({
				  url: '/pages/prize/index?type='+type,
				});
			}
		}
	}
</script>

<style lang="less">
	.container{
		height: 100vh;
		background-color: orange;
		display: flex;
		flex-direction: column;
	}
	.head{
		/* height: 220rpx; */
		background-color: #e59e64;
		display: flex;
		justify-content: space-between;
		align-items:center;
	}
	.head-image{
		margin: 10rpx 0rpx 10rpx 15rpx;
		height: 195rpx;
		width: 195rpx;
		border-radius: 195rpx;
		background-color: aqua;
	}
	.person-info{
		flex: 1;
		margin-left: 15rpx;
		background-color: #ffaadd;
		height: 195rpx;
	}
	.order-show{
		height: 100rpx;
		margin-top: 20rpx;
		background-color: antiquewhite;
	}
	.lucky-draw{
		height: 100rpx;
		background-color: burlywood;
		margin-top: 20rpx;
	}
	.feedback{
		height: 100rpx;
		background: #ff5252;
		margin-top: 20rpx;
	}
	.customer-service{
		height: 100rpx;
		background:purple;
		margin-top: 20rpx;
	}
	page{
		height: 100vh;
		background: #FBFDFB;
	}
	.minePage{
		display: flex;
		flex-direction: column;
		background: #FBFDFB;
		position: relative;
		
		.header_group{
			padding: 48rpx;
			height: 600rpx;
			position: relative;
			.userClass{
				margin: 150rpx 30rpx 0;
				display: flex;
				align-items: center;
				justify-content: space-between;
				.userName{
					z-index: 1;
				}
				.userImg{
					z-index: 1;
					width: 90px;
					height: 90px;
					border-radius: 50%;
					overflow: hidden;
					border: 2px solid #fff;
					box-sizing: border-box;
				}
			}
			.headerImg{
				position: absolute;
				top: 0;
				left: 0;
				z-index: 0;
				width: 100%;
				height: 100%;
			}
		}
		
		.iconGroup{
			width: 654rpx;
			position: absolute;
			top: 390rpx;
			left: 0;
			margin: 48rpx;
			display: flex;
			flex-direction: column;
			align-items: center;
			border-radius: 60rpx 60rpx 0;
			background: linear-gradient(to bottom,#fff,#FBFDFB);
			.topLine{
				margin-top: 30rpx;
				height: 12rpx;
				width: 90rpx;
				background: linear-gradient(to bottom,#FBFBFB,#F1F4F3);
				border-radius: 10rpx;
			}
			.jingang{
				width: 100%;
				display: flex;
				align-items: center;
				flex-wrap: wrap;				
				padding-bottom: 48rpx;
				.iconItem{	
					width: 25%;				
					//width: 33.33%;
					margin-top: 48rpx;
					display: flex;
					flex-direction: column;
					align-items: center;
					position: relative;
					.xyl-topbagebox,.xyl-bagebox{
						position: absolute;
						right: 18rpx;
						top: 0;
					}
					.iconImage{
						width: 90rpx;
						height: 90rpx;
						margin-bottom: 12rpx;
					}
					.item-name{
						font-size: 26rpx;
					}
				}
				// .iconItem:nth-child(n+4){					
				// 	margin-top: 48rpx;
				// }
			}
		}
		
		.title{
			display: flex;
			align-items: baseline;
			font-size: 38rpx;
			position: relative;
			width: 600rpx;
			margin: 0 40rpx;
			padding-top: 48rpx;
			.titleWords{			
				z-index: 2;
			}
			.colorLine{
				position: absolute;
				bottom: 0;
				z-index: 1;
				border-radius: 4px;
				border: 8px; width: 150rpx; height: 6px; background: rgba(208,234,172,0.5);
			}
			.tips{
				margin-left: 24rpx;
				font-size: 24rpx;
				color: #999;
			}
		}
		
	}
</style>